#include <iostream>
#include <unistd.h>
#include <sys/mman.h>
#include <pcap.h>
#include <boost/lexical_cast.hpp>
#include <list>
#include <vector>
#include "alloc.h"
#include <string>


using namespace std;
struct outs
{

int a;
int b;
};
ostream &operator<<(ostream &os,outs out)
{
    os<<out.a << out.b << endl;

}


class Channel
 {
 public:
     Channel (ostream* o = &std::cout): trace_file(o){}
     //重定向输出流
     ~Channel()
     {
     }
     void Reset(ostream* o = &std::cout)
     {
         trace_file = o;
     }
     ostream &getInstance()
     {
              return *trace_file;
     }
 private:
     ostream* trace_file;
 };

#include <fstream>
int main() {
    std::string s = "12344";
    ofstream file("./logxxx");
    file << "1234"<<endl;
    file.close();
    //Channel ch(&file);
    //ch.getInstance() << "1234"<<endl;
    int a = boost::lexical_cast<int>(s);
    std::cout << "12sseo, World!" << a << std::endl;
    std::cout << "Helsvvlo!" << std::endl;
    std::cout << "Helsdlo, World!" << std::endl;
    sleep(1);
    std::vector<int, mystl::alloc<int>> list3;
    list3.push_back(1);
    return 0;
}
